3.3069 \(\int \sqrt{2+\sqrt{\frac{1}{x}}+\frac{1}{x}} \, dx\)

Optimal. Leaf size=75 \[ \frac{1}{4} \left (\sqrt{\frac{1}{x}}+4\right ) \sqrt{\sqrt{\frac{1}{x}}+\frac{1}{x}+2} x+\frac{7 \tanh ^{-1}\left (\frac{\sqrt{\frac{1}{x}}+4}{2 \sqrt{2} \sqrt{\sqrt{\frac{1}{x}}+\frac{1}{x}+2}}\right )}{8 \sqrt{2}} \]

[Out]

((4 + Sqrt[x^(-1)])*Sqrt[2 + Sqrt[x^(-1)] + x^(-1)]*x)/4 + (7*ArcTanh[(4 + Sqrt[x^(-1)])/(2*Sqrt[2]*Sqrt[2 + S
qrt[x^(-1)] + x^(-1)])])/(8*Sqrt[2])

________________________________________________________________________________________

Rubi [A]  time = 0.0420452, antiderivative size = 75, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.312, Rules used = {1966, 1357, 720, 724, 206} \[ \frac{1}{4} \left (\sqrt{\frac{1}{x}}+4\right ) \sqrt{\sqrt{\frac{1}{x}}+\frac{1}{x}+2} x+\frac{7 \tanh ^{-1}\left (\frac{\sqrt{\frac{1}{x}}+4}{2 \sqrt{2} \sqrt{\sqrt{\frac{1}{x}}+\frac{1}{x}+2}}\right )}{8 \sqrt{2}} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[2 + Sqrt[x^(-1)] + x^(-1)],x]

[Out]

((4 + Sqrt[x^(-1)])*Sqrt[2 + Sqrt[x^(-1)] + x^(-1)]*x)/4 + (7*ArcTanh[(4 + Sqrt[x^(-1)])/(2*Sqrt[2]*Sqrt[2 + S
qrt[x^(-1)] + x^(-1)])])/(8*Sqrt[2])

Rule 1966

Int[((a_.) + (c_.)*((d_.)/(x_))^(n2_.) + (b_.)*((d_.)/(x_))^(n_))^(p_.), x_Symbol] :> -Dist[d, Subst[Int[(a +
b*x^n + c*x^(2*n))^p/x^2, x], x, d/x], x] /; FreeQ[{a, b, c, d, n, p}, x] && EqQ[n2, 2*n]

Rule 1357

Int[(x_)^(m_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*x + c*x^2)^p, x], x, x^n], x] /; FreeQ[{a, b, c, m, n, p}, x] && EqQ[n2, 2*n] && NeQ[
b^2 - 4*a*c, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rule 720

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> -Simp[((d + e*x)^(m + 1)*
(d*b - 2*a*e + (2*c*d - b*e)*x)*(a + b*x + c*x^2)^p)/(2*(m + 1)*(c*d^2 - b*d*e + a*e^2)), x] + Dist[(p*(b^2 -
4*a*c))/(2*(m + 1)*(c*d^2 - b*d*e + a*e^2)), Int[(d + e*x)^(m + 2)*(a + b*x + c*x^2)^(p - 1), x], x] /; FreeQ[
{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && NeQ[2*c*d - b*e, 0] && EqQ[m +
2*p + 2, 0] && GtQ[p, 0]

Rule 724

Int[1/(((d_.) + (e_.)*(x_))*Sqrt[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]), x_Symbol] :> Dist[-2, Subst[Int[1/(4*c*d
^2 - 4*b*d*e + 4*a*e^2 - x^2), x], x, (2*a*e - b*d - (2*c*d - b*e)*x)/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a,
b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[2*c*d - b*e, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \sqrt{2+\sqrt{\frac{1}{x}}+\frac{1}{x}} \, dx &=-\operatorname{Subst}\left (\int \frac{\sqrt{2+\sqrt{x}+x}}{x^2} \, dx,x,\frac{1}{x}\right )\\ &=-\left (2 \operatorname{Subst}\left (\int \frac{\sqrt{2+x+x^2}}{x^3} \, dx,x,\sqrt{\frac{1}{x}}\right )\right )\\ &=\frac{1}{4} \left (4+\sqrt{\frac{1}{x}}\right ) \sqrt{2+\sqrt{\frac{1}{x}}+\frac{1}{x}} x-\frac{7}{8} \operatorname{Subst}\left (\int \frac{1}{x \sqrt{2+x+x^2}} \, dx,x,\sqrt{\frac{1}{x}}\right )\\ &=\frac{1}{4} \left (4+\sqrt{\frac{1}{x}}\right ) \sqrt{2+\sqrt{\frac{1}{x}}+\frac{1}{x}} x+\frac{7}{4} \operatorname{Subst}\left (\int \frac{1}{8-x^2} \, dx,x,\frac{4+\sqrt{\frac{1}{x}}}{\sqrt{2+\sqrt{\frac{1}{x}}+\frac{1}{x}}}\right )\\ &=\frac{1}{4} \left (4+\sqrt{\frac{1}{x}}\right ) \sqrt{2+\sqrt{\frac{1}{x}}+\frac{1}{x}} x+\frac{7 \tanh ^{-1}\left (\frac{4+\sqrt{\frac{1}{x}}}{2 \sqrt{2} \sqrt{2+\sqrt{\frac{1}{x}}+\frac{1}{x}}}\right )}{8 \sqrt{2}}\\ \end{align*}

Mathematica [A]  time = 0.0622255, size = 75, normalized size = 1. \[ \frac{1}{16} \left (4 \left (\sqrt{\frac{1}{x}}+4\right ) \sqrt{\sqrt{\frac{1}{x}}+\frac{1}{x}+2} x+7 \sqrt{2} \tanh ^{-1}\left (\frac{\sqrt{\frac{1}{x}}+4}{2 \sqrt{2} \sqrt{\sqrt{\frac{1}{x}}+\frac{1}{x}+2}}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[2 + Sqrt[x^(-1)] + x^(-1)],x]

[Out]

(4*(4 + Sqrt[x^(-1)])*Sqrt[2 + Sqrt[x^(-1)] + x^(-1)]*x + 7*Sqrt[2]*ArcTanh[(4 + Sqrt[x^(-1)])/(2*Sqrt[2]*Sqrt
[2 + Sqrt[x^(-1)] + x^(-1)])])/16

________________________________________________________________________________________

Maple [B]  time = 0.094, size = 123, normalized size = 1.6 \begin{align*}{\frac{1}{16}\sqrt{{\frac{1}{x} \left ( \sqrt{{x}^{-1}}x+2\,x+1 \right ) }}\sqrt{x} \left ( 4\,\sqrt{\sqrt{{x}^{-1}}x+2\,x+1}\sqrt{{x}^{-1}}\sqrt{x}+7\,\ln \left ( 1/4\,\sqrt{2}\sqrt{{x}^{-1}}\sqrt{x}+\sqrt{x}\sqrt{2}+\sqrt{\sqrt{{x}^{-1}}x+2\,x+1} \right ) \sqrt{2}+16\,\sqrt{\sqrt{{x}^{-1}}x+2\,x+1}\sqrt{x} \right ){\frac{1}{\sqrt{\sqrt{{x}^{-1}}x+2\,x+1}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2+1/x+(1/x)^(1/2))^(1/2),x)

[Out]

1/16*(((1/x)^(1/2)*x+2*x+1)/x)^(1/2)*x^(1/2)*(4*((1/x)^(1/2)*x+2*x+1)^(1/2)*(1/x)^(1/2)*x^(1/2)+7*ln(1/4*2^(1/
2)*(1/x)^(1/2)*x^(1/2)+x^(1/2)*2^(1/2)+((1/x)^(1/2)*x+2*x+1)^(1/2))*2^(1/2)+16*((1/x)^(1/2)*x+2*x+1)^(1/2)*x^(
1/2))/((1/x)^(1/2)*x+2*x+1)^(1/2)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{\frac{1}{\sqrt{x}} + \frac{1}{x} + 2}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2+1/x+(1/x)^(1/2))^(1/2),x, algorithm="maxima")

[Out]

integrate(sqrt(1/sqrt(x) + 1/x + 2), x)

________________________________________________________________________________________

Fricas [B]  time = 11.9535, size = 282, normalized size = 3.76 \begin{align*} \frac{1}{4} \,{\left (4 \, x + \sqrt{x}\right )} \sqrt{\frac{2 \, x + \sqrt{x} + 1}{x}} + \frac{7}{64} \, \sqrt{2} \log \left (-2048 \, x^{2} - 64 \,{\left (32 \, x + 9\right )} \sqrt{x} - 8 \,{\left (3 \, \sqrt{2}{\left (32 \, x + 3\right )} \sqrt{x} + 4 \, \sqrt{2}{\left (32 \, x^{2} + 13 \, x\right )}\right )} \sqrt{\frac{2 \, x + \sqrt{x} + 1}{x}} - 1664 \, x - 113\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2+1/x+(1/x)^(1/2))^(1/2),x, algorithm="fricas")

[Out]

1/4*(4*x + sqrt(x))*sqrt((2*x + sqrt(x) + 1)/x) + 7/64*sqrt(2)*log(-2048*x^2 - 64*(32*x + 9)*sqrt(x) - 8*(3*sq
rt(2)*(32*x + 3)*sqrt(x) + 4*sqrt(2)*(32*x^2 + 13*x))*sqrt((2*x + sqrt(x) + 1)/x) - 1664*x - 113)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{\sqrt{\frac{1}{x}} + 2 + \frac{1}{x}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2+1/x+(1/x)**(1/2))**(1/2),x)

[Out]

Integral(sqrt(sqrt(1/x) + 2 + 1/x), x)

________________________________________________________________________________________

Giac [A]  time = 1.10678, size = 100, normalized size = 1.33 \begin{align*} -\frac{1}{16} \, \sqrt{2}{\left (2 \, \sqrt{2} - 7 \, \log \left (2 \, \sqrt{2} - 1\right )\right )} + \frac{1}{4} \, \sqrt{2 \, x + \sqrt{x} + 1}{\left (4 \, \sqrt{x} + 1\right )} - \frac{7}{16} \, \sqrt{2} \log \left (-2 \, \sqrt{2}{\left (\sqrt{2} \sqrt{x} - \sqrt{2 \, x + \sqrt{x} + 1}\right )} - 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2+1/x+(1/x)^(1/2))^(1/2),x, algorithm="giac")

[Out]

-1/16*sqrt(2)*(2*sqrt(2) - 7*log(2*sqrt(2) - 1)) + 1/4*sqrt(2*x + sqrt(x) + 1)*(4*sqrt(x) + 1) - 7/16*sqrt(2)*
log(-2*sqrt(2)*(sqrt(2)*sqrt(x) - sqrt(2*x + sqrt(x) + 1)) - 1)